The procedure "input-port?" returns #f when called with an input port that has been closed. The procedure "output-port?" returns #f when called with an output port that has been closed.
Procedures that open a port for output always create a new file as the destination, destroying any previous file of the same name that may have already existed.
Pixie Scheme allows a maximum of eight input ports and eight output ports to be open at once. The port for a transcript file does not count as one of the eight output ports.